module.exports = class extends think.Model {
    get relation() {
        return {
            category: {
                type: think.Model.HAS_MANY,
                key: 'category_id',
                fKey: 'pid',
                field: 'id as category_id,pid,name as category_name,desc',
                order: 'sort',
                where: {show: 1, status: 0}
            }
        };
    }
};
